package order.service;

import common.model.result.Result;
import order.service.impl.CartServiceFeignClientFallbackFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Service
@FeignClient(name = "cart-server", fallback = CartServiceFeignClientFallbackFallback.class)
public interface CartServiceFeignClient {
    @PostMapping("/cart/sublist")
    Result subCartlist(@RequestParam("uid") Long uid, @RequestBody List<String> cartIds);  // 添加参数名
    
    @PostMapping("/cart/deleteList")  // 改为PostMapping
    Result deleteCartlist(@RequestParam("uid") Long uid, @RequestBody List<String> cartIds);  // 添加参数名
}
